package com.situ.day9;

//实体类：和数据库表一一对应
// 类：大驼峰  StudentManager
// 变量、属性、方法：小驼峰   getInfo()
public class Student {
    //属性、字段  Field
    //default
    public int id;
    String name;
    //私有属性和方法，只能在类内部访问
    int age;
    String gender;//男、女
    //double money;




    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }

    //方法、函数  动作   Method
    public String getInfo() {
        //String str = "[Student: id=1,name=zhangsan,age=23,gender=男]";
        String str = "[Student: id="+id+",name="+name+",age="+age+",gender="+gender+"]";
        return str;
    }

}
